package cn.springboot.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;

@Service
public class UserService {
    @Autowired
    private JdbcTemplate jdbcTemplate;

    public void addUser(String username,String password){
        System.out.println("开始添加用户");
        jdbcTemplate.update("INSERT  into  user(username,password) VALUEs (?,?);",username,password);
        System.out.println("添加用户完成");
    }

}
